from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from routes import get_routes
import uvicorn

app = FastAPI()

# 挂载静态文件
app.mount("/static",StaticFiles(directory="static"),name='static')
print('info', get_routes())
# 包含路由定义
app.include_router(get_routes())  # 使用 get_routes() 函数返回的路由器

if __name__ == '__main__':
    uvicorn.run(app, host='127.0.0.1', port=8080, log_level='info', loop='asyncio')